home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 7
/
FM Towns Free Software Collection 7.iso
/
taropyon
/
guilib3
/
inc
/
fslib.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-11-30
|
6KB
|
168 lines
/* :*****************************************************************
: "fslib.h" : system“Pride”ファイルシステム・ライブラリ
:*****************************************************************
*/
#ifndef _FSLIB_H
#define _FSLIB_H
#ifndef _SPLIB_H
# include "splib.h"
#endif
#ifndef _GUIDEFS_H
# include "guidefs.h"
#endif
#ifndef _FSWILD_H
# include "fswild.h"
#endif
#ifndef FAR
# define FAR _far
#endif
#define FS_FLEN (128)
#define FS_WILD_LEN (12)
typedef struct _WCBUF
{ struct _WCBUF *next;
SHORT no; /* ソートなし用の番号 */
char flag; /* 選択されたファイルの識別用 */
char mark;
UCHAR att;
USHORT time,date;
size_t size;
char name[14];
} WCBUF_T;
#define WCBUF WCBUF_T
#define FSATT_DIR (0x10)
#define FSATT_VOL (0x08)
#define FSATT_SYS (0x04)
#define FSATT_ARC (0x02)
#define FSATT_RO (0x01)
extern int FS_dos_err_chk(void);
extern int FS_chdrv(int drv);
extern int FS_rename(CONST char *old, CONST char *new);
extern int FS_remove(CONST char *name);
extern int FS_mkdir(CONST char *name);
extern int FS_rmdir(CONST char *name);
extern int FS_chdir(CONST char *name);
extern int FS_getdrv(void);
extern int FS_getdir(char *name);
extern int FS_getdir2( char *name );
extern int FS_get_dskFree( int drv, int *totalFree, int *writeFree);
extern int FS_getDskVolume( int drv, char *vol );
extern void FS_getswchar(void);
/* "fslib01.c" ----------------------------------------------------*/
extern int FS_pathSearch( CONST char *pathname, int att, WCBUF *wp );
/* "fslib02.c" ----------------------------------------------------*/
extern int FS_searchWildCard( CONST char *s );
/* "fslib03.c" ----------------------------------------------------*/
extern int FS_getFnamPath( char *filename, CONST char *pathname );
/* "fslib04.c" ----------------------------------------------------*/
extern void FS_getDnamPath( char *directory, CONST char *pathname );
/* "fslib05.c" ----------------------------------------------------*/
extern int FS_patmatch( char *arg, char *nam );
/* "fslib06.c" ----------------------------------------------------*/
extern char *FS_getFnam( char *fnam, CONST char *filename ); /* ファイル名だけ取り出す */
extern char *FS_getSnam( char *snam, CONST char *filename ); /* 拡張子を取り出す */
/* "fslib07.c" ----------------------------------------------------*/
extern char *FS_getDnam( char *dir, char *sfam );
/* "fslib08.c" ----------------------------------------------------*/
extern int FS_argSet( CONST char *s, char **argv[] );
extern void FS_argClear( int argc, char **argv );
/* "fslib09.c" ----------------------------------------------------*/
#define FSPARA_MAX (256) /* 最大256 個のパラメータが指定可能 */
#define FSPARA_ERR (1)
#define FSPARA_IO_ERR (2)
#define FSPARA_ALLOC_ERR (3)
#define FSPARA_OVER_ERR (4)
extern int FS_paraSet( int argc, char *argv[], char **arg[], void (*func)() );
/* "fslib10.c" ----------------------------------------------------*/
extern int FS_getWnamPath( char *filename, char *pathname );
/* "fslib11.c" ----------------------------------------------------*/
#ifdef _FSLIB_HOMEPATH
char HomePath[128];
#else
extern char HomePath[128];
#endif
extern int FS_setHomePath( char *home, CONST char *evt );
/* "fslib12.c" ----------------------------------------------------*/
#ifdef _FSLIB_STARTPATH
char StartPath[128];
#else
extern char StartPath[128];
#endif
extern int FS_setStartPath( char *start, CONST char *cmd);
/* "fslib13.c" ------------------------------------------------*/
extern WCBUF *FS_wc_read( CONST char *arg, int mode);
extern void FS_wc_del( REG WCBUF *wp );
/* "fslib14.c" ------------------------------------------------*/
extern int FS_saveCrtDir(void);
extern int FS_loadCrtAll(void);
extern void FS_clearCrtData(void);
/* "fslib15.c" ------------------------------------------------*/
extern int FS_setFullPathName( char *pathname, CONST char *filename );
/* "fslib16.c" ------------------------------------------------*/
extern void FS_appendSnam( char *df, CONST char *ef, CONST char *sub );
/* "isfexist.c" ------------------------------------------------*/
extern int FS_isFileExist(CONST char *fn);
#define FS_EXIST_NOTHING (0)
#define FS_EXIST_FILE (1)
#define FS_EXIST_DIR (2)
/* "fsgetdta.c" ------------------------------------------------*/
extern int FS_getDta( FAR void **dta );
/* "fssetdta.c" ------------------------------------------------*/
extern int FS_setDta( FAR void *dta );
/* "fsisdel.c" ------------------------------------------------*/
extern int FsDosDelim;
extern int FsPathDelim;
extern int FS_isdelim( int ch );
#define FS_ISDELIM(ch) ((ch)==FsDosDelim||(ch)==FsPathDelim)
/* "fsdos2ux.c" ------------------------------------------------*/
extern void FS_dos2unix( char *unix, CONST char *dos);
/* "fsux2dos.c" ------------------------------------------------*/
extern void FS_unix2dos( char *dos, CONST char *unix);
/* "fsfopen.c" ------------------------------------------------*/
extern void *FS_fopen( CONST char *fnam, CONST char *md);
extern int FS_fclose( void *fp);
/* "fspush.c" ------------------------------------------------*/
extern char *FS_pushDir(void);
extern int FS_popDir( char *dir );
/* "fscmpfn.c" ------------------------------------------------*/
extern int FS_cmpfnam( CONST char *s1, CONST char *s2 ); /* ファイル名を比較する */
/* "fsstrlwr.c" ------------------------------------------------*/
extern void FS_strlwr( char *s ); /* 文字列中のアルファベット(ANK)を小文字にする */
/* "fsstrupr.c" ------------------------------------------------*/
extern void FS_strupr( char *s ); /* 文字列中のアルファベット(ANK)を大文字にする */
#endif